unit PlayerUnit;

interface

uses common;

type
  Player = class
    function move(height, lastNumber, sortedNumber : integer; arr : array of integer) : integer;
  end;

var
  yu, max: integer;
  flag: boolean;
implementation

{ Player }

function Player.move(height, lastNumber, sortedNumber : integer; arr : array of integer): integer;

begin
  if (lastNumber<n-sortedNumber-4) then
    move:=HIT(lastNumber+4)
  else
    move:=HIT(3);
 { max:=0;
  flag:=false;
  for yu:=0 to N-1 do
  begin
    if (arr[yu]<HEIGHT) and (flag=false) then
    begin
      flag:=true;
      move:=HIT(arr[yu]);
    end;
  end;
  if (flag=false) then
  begin
    for yu:=0 to N-1 do
      if (arr[yu]>max) then
        max:=arr[yu];
    move:=HIT(arr[yu]);
  end; }
  
end;

end.
 